<template>
    <div class="header">
      <div class="header-left">
        <div class="iconfont icon-back">&#xe624;</div>
      </div>
      <div class="header-input">
        <span class="iconfont">&#xe632;</span>
        输入城市/景点/游玩主题
      </div>
      <router-link tag="div" to="/city" class="header-right">{{city}}
        <span class="iconfont icon-arrow">&#xe6aa;</span>
      </router-link>
    </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'HomeHeader',
  computed: {
    ...mapState(['city'])
  }
}
</script>

<style lang="stylus" scoped>
  @import '~styles/varibles.styl'
  .header
    display: flex
    line-height: .86rem
    background-color: $bgColor
    color: #fff
    height: .86rem
    .header-left
      width: .64rem
      float: left
      .icon-back
        text-align: center
        font-size: .4rem
    .header-input
      flex: 1
      padding-left: .2rem
      margin: .12rem .2rem
      height: .64rem
      line-height: .64rem
      background-color: #ffffff
      border-radius: .1rem
      color: #ccc
    .header-right
      min-width: 1.04rem
      padding 0 .1rem
      float: right
      text-align: center
      .icon-arrow
        margin-left: -0.06rem
        font-size: .30rem
</style>
